/**
 * @author: wq
 * @Date: 2018/1/7
 * @Time: 14:15
 * <p>
 * Description:
 *          ***
 */
import axios from 'axios';
import {ADMIN} from './api';

var qs = require('qs');

export const getUsers = params => {
  return axios.get(ADMIN + 'users', {params: params});
};

export const modifyStatus = (id, status) => {
  return axios.post(ADMIN + 'users-status', qs.stringify({
    id: id,
    status: status
  }));
};

export const deleted = id => {
  return axios.delete(ADMIN + 'users/' + id);
};

export const logout = () => {
  return axios.post(ADMIN + 'logout');
};
